scrolled window: Avoid a crash
authorMatthias Clasen <mclasen@redhat.com>
Fri, 20 Feb 2015 13:24:47 +0000 (08:24 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 20 Feb 2015 13:28:58 +0000 (08:28 -0500)
commit3a671994d4f4de61a48df6198353a188b7862baa
tree8029bcd3e3725d7844506c189cc64a655b0fd0ad
parent4fc98ae34566a8416a345ebdd2a51828f8192632
scrolled window: Avoid a crash

gtk_scrolled_window_allocate_scrollbar was calling
gtk_scrolled_window_allocate_child just to get the relative
allocation, overlooking the fact that that function is only
safe to call if the scrolled window _has_ a child. Unfortunately,
gtk_scrolled_window_allocate_scrollbar will sometimes get called
when that is not the case. Since we are really only interested
in the relative allocation, just get that directly. This
fixes a segfault in the style-properties-nth-child reftest.
gtk/gtkscrolledwindow.c